<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>四川省工程建设领域项目信息、信用信息公开维护平台</title>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/css/reset.css" />
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/css/main.css" />
<script src="<%=request.getContextPath()%>/scripts/jquery.pack.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/scripts/jquery.form.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/scripts/submitcheck.js"></script>

<script type="text/javascript"> 
function resize(){
	var h=50;
	try{
		if(mainFrame && mainFrame.document && mainFrame.document.body){
			var o=mainFrame.document.body;
			var h=o.scrollHeight + (typeof(o.clientTop)== 'number' ?o.clientTop * 2 : 0);
		}
	}
	catch(e){
		var h=50;window.status=e.description;
	}
	if(h<50){h=50;}
	document.getElementById('mainFrame').style.height=h+'px';
	return h+"px";
}


var queryType;
var proType;
var proCode;
var isShow;
function setProCode(newProCode){ 
	proCode=newProCode 
}
var canShowFromQuery = true; //从查询类型上判断是否可以显示下面的颜色
function querytype(obj, canEdit)
{
	if (queryType != obj)
	{
		if (!queryType)
			document.getElementById('link1').className="normalcolor";
		else
			queryType.className="normalcolor";
		queryType=obj;
		obj.className="selectedcolor";
		canShowFromQuery = canEdit;
	}
	clearProList();
}

function clearProList()
{
	proCode = null;
	var sbpro = document.getElementById('sbpro');
	if (sbpro) sbpro.disabled = true;
	var size = $("dd").size();
	for (var i = 1 ; i <= size ; i ++) {
		$("a#p" + i).removeClass("ophover");
		$("a#p" + i).css("color", "#5157AB");
	}
}

function protype(obj) {
	if (proCode){
		var context = '<%=request.getContextPath()%>';
		// 获取链接数量
		var size = $("dd").size();
		// 取消CSS
		for (var i = 1 ; i <= size ; i ++) {
			//$("a#p" + i).css("color", "#5157AB");
			$("a#p" + i).removeClass("ophover");
		}
		// 选中
		$(obj).addClass("ophover");
		//$(obj).css("color", "#000");
		
		if (proCode) {
			// 打开链接
			mainFrame.location.href=context + "/" + $(obj).attr('name') + '?proCode=' + proCode + '&show=' + isShow;
		}
	}
}

$(function (){
	// 获取链接数量
	var size = $("dd").size();
	// 绑定事件
	for (var i = 1 ; i <= size ; i ++) {
		$("a#p" + i).bind('click', function (){
			protype($(this));
		});
	}
});

function add()
{
	proCode = null;
	mainFrame.location.href='<c:url value="/audit/editshow"/>';
	clearProList();
}

function openPro(id,reload) {
	proCode = id;
	//TODO:显示本项目的权限
	if (reload == 1){
		var sbpro = document.getElementById('sbpro')
		if ( sbpro ){
			sbpro.disabled = false;
		}
	}
}
function showPro(id, show){
	if (show){
		$("a#p" + id).css("color", "#F00");
	}
	else{
		$("a#p" + id).css("color", "#5157AB");
	}
}

function initPro(va){
	if (va && va.length>0)
	{
		for(var i = 0 ; i < va.length; i++)
		{
			if (va[i] == 1)
				$("a#p" + (i+1)).css("color", "#F00");
			else
				$("a#p" + (i+1)).css("color", "#5157AB");
		}
	}
}
function manageAccount(url){
	window.open(url, '');
}
</script>
<c:if test="${depaId==0}">
<script type="text/javascript">
	function sbpro()
	{
		if (proCode)
		{
			if(confirm('项目提交后将不可修改，确认提交？'))
			{
				var options={type:"POST",url: "<%=request.getContextPath()%>/main/sbpro/"+proCode, dataType:"json", success: resultResponse};
			 	$.ajax(options);
			}
		}
	}
</script>
</c:if>

</head>
<body>
<table class="top">
	<tr>
		<td width="40" class="topl"></td>
		<td width="840">
		<div class="plat_title"><img
			src="<%=request.getContextPath()%>/images/toptitle.gif" /></div>
		</td>
		<td width="21"><div class="top_drop_btn"></div></td>
		<td width="20"><div class="maxbtn"></div></td>
		<td width="29"><div class="closebtn"></div></td>
	</tr>
</table>
<table class="content">
	<tr>
		<td class="main_l"></td>
		<td class="main_lbar"></td>
		<td width="918" valign="top">
		<div class="banner"><img
			src="<%=request.getContextPath()%>/images/banner.jpg" alt="" /></div>
		<div class="user_status"><span><input type="button"
			class="btn40" value="退出" onclick="location.href='<%=request.getContextPath()%>/exit.jsp'"/></span>
			<span><input type="button" value="帐号管理" class="bnt60" onclick="manageAccount('<%=request.getContextPath()%>/main/manageAccount/${userId}')"/></span>欢迎 ${admin}!</div>
		<div class="op_con">
		<div class="op_left">
		
		<div class="status">
		<h1>功能菜单</h1>
		<ul>
			
			<li><a id="link1"
				href="<%=request.getContextPath()%>/admin/userList"
				target="mainFrame" class="selectedcolor" onclick="querytype(this,true)">用户管理</a></li>
			<li><a id="link2"
				href="<%=request.getContextPath()%>/admin/projectManagement"
				target="mainFrame" class="normalcolor" onclick="querytype(this,false)">项目管理</a></li>
		</ul>
		</div>
		
		<dl>
			<dt>项目信息类别</dt>
			<dd><a href="javascript:void(0)" id="p1" name="admin/editProAuditInfo">项目编码和项目审批</a></dd>
			<dd><a href="javascript:void(0)" id="p2" name="admin/editProManage">项目建设管理</a></dd>
			<dd><a href="javascript:void(0)" id="p5" name="admin/editCompanyList" >项目从业单位信用</a></dd>
			<dd><a href="javascript:void(0)" id="p6" name="admin/editPersonList" >项目从业人员信用</a></dd>
			<dd><a href="javascript:void(0)" id="p3" name="admin/editLandAudit" >项目土地使用权审批和出让</a></dd>
			<dd><a href="javascript:void(0)" id="p4" name="admin/editMinAudit" >项目矿业权审批和出让</a></dd>
		</dl>
		
		<dl>
			<dt id="test">公告通知</dt>
		</dl>
		<marquee align="center" behavior="scroll" direction="up" height=150 scrollamount="2" scrolldely="10">
			<ul class="noticeul">
				<li><span>·</span><a href="#">系统公告：建议使用版本在6.0以上的IE或FireFox访问&nbsp;2010-05-30</a></li>
				<li><span></span><a href="#"></a></li>
				<li><span></span><a href="#"></a></li>
				<li><span>·</span><a href="#">系统公告：本系统平台处于测试运行中，请大家输入完整的信息，有疑问即时用下面的QQ联系<br/>&nbsp;2010-05-28</a></li>
			</ul>
		</marquee>
		</div>
		<div class="op_right">
		
		<iframe id="mainFrame" name="mainFrame" onload="resize()" frameborder="0" src="<c:url value="/admin/userList"/>" 
		scrolling="no" frameborder="0" style="width:100%;;height:expression(resize())" height="22">
		</iframe>
		
		</div>
		</div>
		</td>
		<td class="main_rbar"></td>
		<td class="main_r"></td>
	</tr>
</table>
<table class="bot">
	<tr>
		<td width="41"><div class="botl"></div></td>
		<td width="867"></td>
		<td width="42"><div class="exit"></div></td>
	</tr>
</table>
</body>
<c:import url="/foot.jsp"></c:import>
</html>
